﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE> <? echo $title;?> </TITLE>
<base href="<?php echo base_url() ?>" />
<LINK href="images/default.css" type="text/css" rel=stylesheet>
<SCRIPT src="js/common.js" type="text/javascript"></SCRIPT>
<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<script src="js/jquery.form.js" type="text/javascript"></script>
<SCRIPT type="text/javascript">
   function collapse_change(menucount) {
       $("#list_"+menucount).toggle() ;
}
function check_form(theform)
	{
		if (theform.name.value=="")
		{
			 $('#auth').html("&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/check_error.gif\" /><span class=\"about_content_title\"> &nbsp;&nbsp;查询条件不能为空!</span>");
			 $("#name").focus();
			 return false;
		}
	}
</SCRIPT>
<script type="text/javascript">
$(function() {
$("#selectall").click(function() {
  $("input[@type='checkbox']").each(function() {
    $(this).attr("checked", true);
});
});//全选
$("#noselectall").click(function() {
  $("input[@type='checkbox']").each(function() {
    if($(this).attr("checked")==true){
     $(this).attr("checked", false);
    }else{
      $(this).attr("checked", true);
    }
});
});//反选
$("#deselectall").click(function() {
  $("input[@type='checkbox']").each(function() {
     $(this).attr("checked", false);
});
});//取消选择
$("#del").click(function() {
  if (confirm("确实要删除吗?") == true){
  $("input[@type='checkbox']").each(function() {
    if($(this).attr("checked")==true){
      var data_url= '<?php echo site_url("admin/org3_del2")?>'+"/"+$(this).val();
      $.post(data_url,function(str){
         $(this).attr("disabled",true);//设为不可用
         $(this).hide();
       }
      ); //Ajax提交
       alert("删除成功，请点击刷新！");
    }//endif
  });
  }//endif
 });//删除
});
</script> 
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A href="<?php echo site_url("admin/info"); ?>" target="main">后台首页</A>&nbsp;» 查询三级组织</TD>
        </TR></TBODY></TABLE>
      <BR>
         <FORM id="myform" name="myform" method="post" action="<?php echo site_url("admin/org3_find"); ?>"  onsubmit="return check_form(this)" >
        <table class="tableborder" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="header">
          <td colspan="2">查询条件 </td>
        </tr>
        <tr>
          <td width="210" >请输入三级组织名称：            </td>
          <td><input type="hidden" name="lastname" id="lastname"value="<? if(isset($lastname)){echo $lastname;} ?>"><input type="text" name="name" id="name" size="40"><span id="auth" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></span></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input id="submit" type=submit value="提 交" name=submit>&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="清 除" name="con1"  onclick=" $('#myform').clearForm();$('#name').focus();">&nbsp;&nbsp;&nbsp;&nbsp;
          </td>
        </tr>
        <tr>
          <td>  </td>
          <td > <div id="msgs" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></div>        </td>
        </tr>
      </table>
      </FORM>
           <TABLE class="tableborder" cellSpacing=0 cellPadding=0 width="100%"
border=0>
        <TBODY>
        <TR class="header">
          <TD colSpan=5>查询结果<A onClick="collapse_change(1)" href="javascript:void(0)"><IMG src="images/menu_reduce.gif" name="menuimg_b8e6f4fa493903c4" border=0 id=menuimg_b8e6f4fa493903c4 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px"></A> </TD>
        </TR>
        <TBODY id=list_1>
        <TR>
          <TD width="30" class="altbg1"><b></b></TD>
          <TD width="50" class="altbg1"><b>ID</b></TD>
          <TD width="120"class="altbg1" ><b>二级组织</b></TD>
          <TD class="altbg1"><b>三级组织名称</b></TD>
          <TD width="80" class="altbg1" ><b>编辑</b></TD>
        </TR>
        <?php
        if(isset($org3))
        {
        	foreach ($org3->result() as $row) :
        ?>
        <TR>
          <TD width="30" class="altbg2" ><input id="ck<?echo $row->org3_id?>" type="checkbox" value="<? echo $row->org3_id ?>"></TD>
          <TD width="50" class=altbg2><?php echo $row->org3_id ?></TD>
          <TD class="altbg2"><a  title="点击查看二级组织详情." href="<?php echo site_url("admin/org2_edit") ."/". $row->org2_id; ?>" target="main"><?php echo $row->org2_name?></a></TD>
          <TD class="altbg2"><a title="点击可编辑" href="<?php echo site_url("admin/org3_edit") ."/". $row->org3_id; ?>" target="main"><?php echo $row->org3_name ?></a></TD>
          <TD width="80" class="altbg2"><a href="<?php echo site_url("admin/org3_edit") ."/". $row->org3_id; ?>">编辑</a> </TD>
        </TR>
        <?php
        	endforeach;
        }
        ?>
       
        <TR>
          <TD colspan="5" >
           <input type="button" id="selectall" name="selectall" value="全 选" />&nbsp;&nbsp;&nbsp;&nbsp;
           <input type="button" id="noselectall" name="noselectall" value="反 选" />&nbsp;&nbsp;&nbsp;&nbsp;
           <input type="button" id="deselectall" name="deselectall" value="取消选择" />&nbsp;&nbsp;&nbsp;&nbsp;
           <input type="button" value="刷 新" name="refresh" onclick="window.location.reload() ;">&nbsp;&nbsp;&nbsp;&nbsp;
           <input type="button" value="删 除" name="del" id="del" onclick="" align="right">
          </TD>
        </TR>
       </TBODY></TABLE> 
     </TD>
     </TR>
    </TBODY>
   </TABLE><BR><BR>
   <BR><BR>
      <DIV class=footer>
        <HR width="80%" color=#9db3c5 noShade SIZE=0>
         Powered by <? echo $copyright ?>  <em>,</em> <B><A style="COLOR: #666" href="<? echo base_url() ?>" target="_blank"><? echo $version;?>.</A></B>
      </DIV>
</BODY></HTML>
